﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Linq;
using System.Data.Linq.Mapping;

namespace Prerequisites.Models
{
    [Table(Name = "rubriken")]
    public class Rubik
    {
        [Column(IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.OnInsert)]
        internal int rubrik_id { get; set; }

        [Column(Name = "rubrik")]
        public string rubrik { get; set; }

        [Association(OtherKey = "rubrik_id")]
        private EntitySet<Artikel> _artikeln = new EntitySet<Artikel>();
        public IList<Artikel> artikeln
        {
            get
            {
                return _artikeln.ToList().AsReadOnly();
            }

        }
    }
}